package com.baizhiedu.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * 功能：
 * 作者：HZj
 * 日期：2025/1/5 23:21
 */
@Aspect
@Component
public class MyAspect {
    @Pointcut("execution(* com.baizhiedu.aop..*.*(..))")
    public void pointCut(){}

    @Around("pointCut()")
    public Object arround(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("----Log----");
        Object ret = joinPoint.proceed();
        return ret;
    }
}
